<?php
// +----------------------------------------------------------------------
// | TOPThink [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011 http://topthink.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$

class BlogAction extends Action{
    public function index(){
        $Model  =  D('Bloglog');
		$this->assign('list',$Model->order('id desc')->select());
        $this->display();
    }

    public function addBlog(){
      //  $Model  =   D('Form');
      //  $this->assign('vo',$Model->getDetail($id));
        $this->display();
    }
	public function addBlogCom(){
		//$arr['CreateUser'] = $_SESSION[C('USER_AUTH_KEY')]['TrueName'];
		$arr['Title'] = $this->_post('Title');
		$arr['Tags'] = $this->_post('Tags');
		$arr['Content'] = $this->_post('Content',false);
		$arr['CreateDate'] = date("Y-m-d H:i:s");
		add_blog($arr);
		$this->success('添加成功', 'index');
	}
	
	public function article(){
		$id = $this->_get('id');
		$onedata = M('Bloglog')->where("id={$id}")->find();
		$this->assign('article',$onedata);
		$this->display();
	}

    public function getSchoolList(){
		$this->display();
    }
    public function nameValid(){
      //  $Model  =   D('Form');
      //  $this->assign('vo',$Model->getDetail($id));
     
    }    
    public function registerCom(){
      //  $Model  =   D('Form');
      //  $this->assign('vo',$Model->getDetail($id));
        $this->display();
    }
    public function detailForm()
    {
       $this->display();
    }
    public function getSpecialFieldList()
    {
    	$this->display();
    }
    
}
